﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">

    <Style TargetType="{x:Type Border}">
        <Setter Property ="CornerRadius" Value="20"/>
        <Setter Property ="BorderThickness" Value="1"/>
    </Style>
    <Style x:Key="ButtonFocusVisual">
    	<Setter Property="Control.Template">
    		<Setter.Value>
    			<ControlTemplate>
    				<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
    <LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
    	<GradientStop Color="#F3F3F3" Offset="0"/>
    	<GradientStop Color="#EBEBEB" Offset="0.5"/>
    	<GradientStop Color="#DDDDDD" Offset="0.5"/>
    	<GradientStop Color="#CDCDCD" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
    <Style x:Key="ButtonStyleRight" TargetType="{x:Type Button}">
    	<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    	<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
    	<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
    	<Setter Property="BorderThickness" Value="1"/>
    	<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    	<Setter Property="HorizontalContentAlignment" Value="Center"/>
    	<Setter Property="VerticalContentAlignment" Value="Center"/>
    	<Setter Property="Padding" Value="1"/>
        <Setter Property="FontSize" Value="20"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="FontFamily" Value="Microsoft YaHei UI"/>
        <Setter Property="Foreground" Value="#FF0475CB"/>
        <Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="{x:Type Button}">
                    <Grid Margin="0">
    				<Path Data="M16,8 C16,8 -0.5,9.722462 -0.5,23.5 -0.5,39.5 -0.5,39.499721 -0.5,39.499721 -0.5,39.499721 -0.5,55.499443 15.5,55.499443 L119.5,55.499443 175.5,31.499861 119.5,7.5002787 z" Margin="0" Stretch="Fill" Stroke="Black" RenderTransformOrigin="0.5,0.5">
    					<Path.RenderTransform>
    						<TransformGroup>
    							<ScaleTransform ScaleX="1"/>
    							<SkewTransform/>
    							<RotateTransform/>
    							<TranslateTransform/>
    						</TransformGroup>
    					</Path.RenderTransform>
    					<Path.Fill>
    						<LinearGradientBrush EndPoint="0.67,1.009" MappingMode="RelativeToBoundingBox" StartPoint="0.29,-0.056">
    							<GradientStop Color="White" Offset="0"/>
    							<GradientStop Color="#FF999999" Offset="1"/>
    						</LinearGradientBrush>
    					</Path.Fill>
    				</Path>
                        <TextBlock Margin="0,0,40,0" TextWrapping="Wrap" Text="TextBlock" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Grid>
                    <ControlTemplate.Triggers>
    					<Trigger Property="IsKeyboardFocused" Value="true"/>
    					<Trigger Property="ToggleButton.IsChecked" Value="true"/>
    					<Trigger Property="IsEnabled" Value="false">
    						<Setter Property="Foreground" Value="#ADADAD"/>
    					</Trigger>
    				</ControlTemplate.Triggers>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
    <Style x:Key="ButtonStyleLeft" TargetType="{x:Type Button}">
    	<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    	<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
    	<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
    	<Setter Property="BorderThickness" Value="1"/>
    	<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    	<Setter Property="HorizontalContentAlignment" Value="Center"/>
    	<Setter Property="VerticalContentAlignment" Value="Center"/>
    	<Setter Property="Padding" Value="1"/>
        <Setter Property="FontSize" Value="20"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="FontFamily" Value="Microsoft YaHei UI"/>
        <Setter Property="Foreground" Value="#FF0475CB"/>
        <Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="{x:Type Button}">
    					<Path Data="M16,8 C16,8 -0.5,9.722462 -0.5,23.5 -0.5,39.5 -0.5,39.499721 -0.5,39.499721 -0.5,39.499721 -0.5,55.499443 15.5,55.499443 L119.5,55.499443 175.5,31.499861 119.5,7.5002787 z" Margin="0" Stretch="Fill" Stroke="Black" RenderTransformOrigin="0.5,0.5" Height="40" Width="150">
    						<Path.RenderTransform>
    							<TransformGroup>
    								<ScaleTransform ScaleX="-1"/>
    								<SkewTransform/>
    								<RotateTransform/>
    								<TranslateTransform/>
    							</TransformGroup>
    						</Path.RenderTransform>
    						<Path.Fill>
    							<LinearGradientBrush EndPoint="0.67,1.009" MappingMode="RelativeToBoundingBox" StartPoint="0.29,-0.056">
    								<GradientStop Color="White" Offset="0"/>
    								<GradientStop Color="#FF999999" Offset="1"/>
    							</LinearGradientBrush>
    						</Path.Fill>
    					</Path>
    				<ControlTemplate.Triggers>
    					<Trigger Property="IsKeyboardFocused" Value="true"/>
    					<Trigger Property="ToggleButton.IsChecked" Value="true"/>
    					<Trigger Property="IsEnabled" Value="false">
    						<Setter Property="Foreground" Value="#ADADAD"/>
    					</Trigger>
    				</ControlTemplate.Triggers>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>

    <Style x:Key="windowOpacity" TargetType="{x:Type Window}">
        <Style.Triggers>
            <EventTrigger RoutedEvent="Window.Loaded">
                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation Storyboard.TargetProperty="Opacity"
                                            From="0.1" To="1.0" Duration="0:0:0.3"
                                            />
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </Style.Triggers>
    </Style>


</ResourceDictionary>